<template>
    <div class="like_section">
        <CateCard :data="likeList" :width="'19%'"></CateCard>
    </div>
</template>
<script setup>
import CateCard from '@/components/CateCard.vue'
import { ref , onMounted } from 'vue'
import { useStore } from 'vuex'
import { LikeList } from '@/utils/last.js'
const store = useStore();
const likeList = ref([]);
const getList = async ()=>{
        let data = await LikeList({user_id:store.state.user_id});
        //  if (data.code == '001') {
            likeList.value = data.collectList
            console.log(data.collectList);
        // }
}
// let userid = store.state.user_id
// const getMyLike = async ()=>{
//     let data = await LikeList(userid)
//         if (data.code == '001') {
            // likeList.value = data.collectList
            // console.log(data.collectList);
//         }
//     }
onMounted(() => {
  getList();  
})
</script>
<style lang="scss" scoped>
    .like_section{
        display: flex;
        flex-direction: row;
        // justify-content: space-between;
        flex-wrap: wrap;
    }
</style>